#pragma once

#include "Base/AbstractRemoteProcedure.h"
#include <QObject>
#include "Network/Connection.h"

namespace TC
{
	namespace Request
	{
		class TCCORE_EXPORT MultiPostFetcher : public AbstractRemoteProcedure
		{
			Q_OBJECT
				Q_PROPERTY(QVariantList posts MEMBER posts)
		public:
			Q_INVOKABLE void fetchNewer(const QDateTime &time, uint number = 10);
			Q_INVOKABLE void fetchOlder(const QDateTime &time, uint number = 10);
		protected:
			void onDataReady(QDataStream &stream) override;
		private:
			QVariantList posts;
		};
	}
}